<%@ page language="java"  pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>行业视点添加</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<LINK href="resource/css/admin.css" type="text/css" rel="stylesheet">
	 <script type="text/javascript" src="<%=basePath%>scripts/ckeditor/ckeditor.js"></script>
	 <script type="text/javascript">
	    function  addcheck(){
	        String.prototype.trim=function(){
                 return this.replace(/(^\s*)|(\s*$)/g, "");
            }
             var  title=document.getElementById("title").value;
             var  titlevale=title.trim();
             if(titlevale==""){
                 alert("请填写标题");
                 return false;
             }
             if(titlevale.length<2 || titlevale.length>20){
                 alert("标题的长度应大于2 小于20");
                 return false;
             }
               var  code=document.getElementById("code").value;
             if(code==""){
                 alert("请填写序号");
                 return false;
             }else{
                if(isNaN(code)){
                   alert("请输入数字");
                   return  false;
                }
             }
	    }
	 </script>
  </head>
  
  <body>
    <div align="center">
      <form  method="post" action="<%=basePath%>profession/addProfessional.shtml" onsubmit="return addcheck()">
      <table>
      <tr>
      <td>    
           <input type="hidden"  name="professional.id" value="${pro.id}"/>
                 标题:</td><td> 
               
             <input type="text" name="professional.title" id="title"  value="${pro.title}">
            </td>
       </tr>
              <tr>
      <td> 
          
                编号:</td><td> 
               
             <input type="text" name="professional.code" id="code" value="${pro.code}">
            </td>
       </tr>
      
        <tr><td> 简介：</td>
        <td><textarea id="content" name="professional.describe" cols="28" rows="20">
          
           ${pro.describe}
         </textarea></td></tr>
        <tr><td align="center" colspan="2"><input type="submit" value="保存" />&nbsp;&nbsp;<input type="reset" value="重置"></td></tr>
        </table>
        </form>
      </div>
        <script type="text/javascript">  
	//filebrowserUploadUrl ： 配置路径 Type 为不同类型文件在userfiles中存放的文件夹名
   					var editor = CKEDITOR.replace('content',{filebrowserUploadUrl : 'ckeditor/uploader?Type=File',   
									filebrowserImageUploadUrl : 'ckeditor/uploader?Type=Image',   
									filebrowserFlashUploadUrl : 'ckeditor/uploader?Type=Flash'  
   					});   
	</script>
  </body>
</html>
